package helpers;

import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created with IntelliJ IDEA.
 * User: VMoskalenko
 * Date: 22.06.12
 * Time: 17:18
 */
public class Fixtures {

    public static HttpServletRequest billGatesRequest() {
        MockHttpServletRequest request = new MockHttpServletRequest();
        request.setRequestURI("/person/create");
        request.setMethod("POST");
        request.setParameter("firstName", "Bill");
        request.setParameter("lastName", "Gates");
        request.setParameter("middleName", "Petrovich");
        request.setParameter("jobTitle", "CEO Microsoft");
        return request;
    }

    public static HttpServletRequest getRequest() {
        MockHttpServletRequest request = new MockHttpServletRequest();
        request.setRequestURI("/person/create");
        request.setMethod("GET");
        return request;
    }

    public static HttpServletResponse emptyResponse() {
       return new MockHttpServletResponse();
    }
}
